<?php
namespace Api\Controller;

use Think\Controller;

class ShopController extends CommonController
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 店铺信息
     * @return [type] [description]
     */
    public function index()
    {
        $id = I('post.id', 0, 'intval');

        $shop = D('Api/Shop', 'Service')->info($id);

        success($shop);
    }

    /**
     * 门店商品
     * @param  string $value [description]
     * @return [type]        [description]
     */
    public function goods($value = '')
    {
        $id   = I('post.id', 0, 'intval');
        $page = I('post.page', 0, 'intval');

        $goods = D('Api/Goods', 'Service')->shopGoods($id, $page);
        success($goods);
    }
}
